luci-app-opkg: relax dependency parsing
authorJo-Philipp Wich <[email protected]>
Fri, 30 Sep 2022 07:59:39 +0000 (09:59 +0200)
committerJo-Philipp Wich <[email protected]>
Fri, 30 Sep 2022 08:03:24 +0000 (10:03 +0200)
commit9f6876bfb6d405cd8b7ba350bad71d890ddd5681
tree9b0fa8419ce55e72c9cc60d05a24395893e32ffb
parentb6b7da4ffa5fea45b72c7f99c482fdf9a9c35c9f
luci-app-opkg: relax dependency parsing

Align depdendency parse logic with opkg to properly process certain
malformed dependency specifications. In particular do not require a
depdendency specification to end after the closing paren of a version
constraint and perform non-greedy matching in order to extract the
first version constraint only.

Fixes: #5997
Ref: https://forum.openwrt.org/t/x/138328
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 84ba6a5c36072f74721d535104735757b005c8d6)
applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js